package hu.mapro.rollerx.android;

import hu.mapro.rollerx.core.RollerXGame;
import android.content.pm.ActivityInfo;
import android.os.Bundle;

import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;

public class RollerXActivity extends AndroidApplication {

	@Override
	public void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
			config.useAccelerometer = true;
			config.useGL20 = true;
			setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
			config.useWakelock = true;
			RollerXGame rollerX = new RollerXGame();
			
//			if (Gdx.input.isPeripheralAvailable(Peripheral.Accelerometer)) {
//						
//				rollerX.controlCallback = new Runnable() {
//					float[] R = new float[9];
//					
//					@Override
//					public void run() {
//						
//						SensorManager.
//						
//						SensorManager.getRotationMatrix(R, null, gravity, geomagnetic)
//						
//					}
//				};
//			}
			
			initialize(rollerX, config);
			
	}
	
}
